
from yacf.Tools.Dump import Dump

#from yacf.Backends.Cuda.Mutators.CM_OmpParallelFor import CM_OmpParallelFor
#from yacf.Backends.Cuda.Mutators.CM_OmpParallel import FM_LlcRegion

#from yacf.Frontend.Parse import parse_source

from yacf.Backends.C.Writers.OmpWriter import OmpWriter

from yacf.Frontend.InternalRepr import AstToIR

BACKEND_NAME = 'Common'

TEST_PATH = 'yacf/Backends/' + BACKEND_NAME + '/tests/'
CODE_PATH =  TEST_PATH + 'codes/'
TREE_PATH =  TEST_PATH + 'trees/'

def build_tools_tree():
    """ Builds the tests AST for both pi.c and pi.cu 
    
    """
    template_code = '''
    int main() {
        int f = 0;
        int i = 0;
        i = 7;
    }
    '''
    new_ast = parse_source(template_code, "Tool test 1")
    Dump.save(TREE_PATH + '/insert_tool_tree', new_ast)

